<script type="text/javascript">
seajs.use('src/pay/order', function (order) {
});

</script>
<?php 
$this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'order-grid',
	'cssFile'=>false,
	'emptyText'=>'未找到符合条件数据',
	'itemsCssClass'=>'table table-bordered table-hover',
	'dataProvider'=>$provider,
	'summaryText'=>"",
	'columns'=>array(
		'id',
		'createtime',
		'orderStatus',
		array(
			'name'=>'amount',
			'value'=>'Utils::getCurrencyUnit("USD").$data->amount'
		),
		array(
			'class'=>'CButtonColumn',
			'template'=>'{viewOrder} {payOrder} {orderCancel}',
			'buttons'=>array(
					'viewOrder'=>array(
						'options'=>array('class'=>'btn'),
						'label'=>'查看订单',
						'url'=>'Yii::app()->createUrl("pay/order/detail",array("orderid"=>$data->id))'
					),
					'payOrder'=>array(
							'options'=>array('class'=>'btn btn-warning'),
							'label'=>'付款',
							'url'=>'Yii::app()->createUrl("pay/order/do",array("orderid"=>$data->id))',
							'visible'=>'$data->status==0'
					),
					'orderCancel'=>array(
							'options'=>array('class'=>'btn btn-info orderCancel'),
							'label'=>'取消订单',
							'visible'=>'$data->status==0',
							'url'=>'Yii::app()->createUrl("pay/order/cancel",array("orderid"=>$data->id))'
					)
			)
				
		)
			
	),
)); ?>